package com.icloud.common.database.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@TableName("red_packet")
@ApiModel(value = "RedPacket对象", description = "红包表")
public class RedPacket implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("创建时间")
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @ApiModelProperty("修改时间")
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @ApiModelProperty("创建人id")
    @TableField("created_id")
    private Long createdId;

    @ApiModelProperty("群组id")
    @TableField("group_id")
    private String groupId;

    @ApiModelProperty("标题")
    @TableField("`title`")
    private String title;

    @ApiModelProperty("状态, UNHANDLED, HANDLED, EXPIRE")
    @TableField("`handle_state`")
    private String handleState;

    @ApiModelProperty("状态, STOP, NORMAL")
    @TableField("`state`")
    private String state;

    @ApiModelProperty("红包总金额")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty("已领取金额")
    @TableField("amt_received")
    private BigDecimal amtReceived;

    @ApiModelProperty("红包类型,NORMAL:一对一红包;GROUP_EXCLUSIVE:群专属红包;GROUP_RANDOM:群拼手气红包;GROUP_NORMAL:群普通红包")
    @TableField("`type`")
    private String type;

    @ApiModelProperty("红包数量")
    @TableField("number")
    private Integer number;

    @ApiModelProperty("领取人")
    @TableField("receive_id")
    private Long receiveId;
}
